unit uSplash;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes,
  System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects,
  System.IOUtils, FMX.ListBox, FMX.Layouts, FMX.StdCtrls, FMX.Media, FMX.Notification;

type
  TfmSplash = class(TForm)
    MediaPlayer1: TMediaPlayer;
    Timer1: TTimer;
    procedure FormActivate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmSplash: TfmSplash;

implementation

{$R *.fmx}

uses uMenu;

procedure TfmSplash.FormActivate(Sender: TObject);
begin
  MediaPlayer1.FileName := TPath.GetDocumentsPath + PathDelim + 'idella.mp3';
  if fmMenu.Switch2.IsChecked then
    MediaPlayer1.Play;
  if Timer1.Enabled = false then
    Timer1.Enabled := true;
end;

procedure TfmSplash.Timer1Timer(Sender: TObject);
begin
  fmMenu := TfmMenu.Create(nil);
  fmMenu.Show;
  Timer1.Enabled := False;
end;

end.
